#!/usr/env/bin python
# -*- coding: utf-8 -*-

# @Time    : 2018/4/17 10:52
# @Author  : yangdy
# @Email   : yangdy@egu360.com
# @File    : test.py
# @Software: PyCharm

"""  
test
TODO模块说明
Public Class:
-	TODO类名: TODO类说明 
Public Methods: 
-	TODO方法名: TODO方法说明
"""
from random import randint

# a = 1 + 5 + 4 + 2 + 8 + 3 + 2 + 1 + 2 + 8 + 1 + 4 + 1 + 12 + 2 + 6 + 2 + 14 + 3 + 14 + 19 + 1 + 1 + 21 + 10 + 8 + 7 + 18 + 41 + 24 + 50 + 6 + 12 + 3 + 3 + 51 + 49 + 61 + 1 + 1 + 37 + 1 + 1 + 1 + 1 + +34 + 10 + 1 + 34 + 1 + 3 + 4 + 5 + 4 + 3 + 1
# b = 0 + 2 + 1 + 1 + 2 + 1 + 1 + 2 + 2 + 1 + 7 + 3 + 2 + 5 + 1 + 4 + 2 + 1 + 2 + 20 + 1 + 1 + 3 + 5 + 5 + 4 + 1
#
# c = 25 + 25 + 25 + 12 + 7 + 11 + 16 + 14 + \
#     24 + 17 + 7 + \
#     19 + 12 + 16 + 12 + 14 + 19 + 9 + 14 + 6 + 15 + 15 + 3 + \
#     11 + 11 + 18 + 18 + 17 + 5 + \
#     18 + 20 + 5 + 21 + 7 + 11 + 17 + 14 + 10 + 15 + 27 + 18 + 24 + 11 + \
#     9 + 5 + 19 + 15 + 14 + \
#     0
# d = 12 + 18 + 11 + 46 + 23 + 36 + 20 + 48 + \
#     29 + 6 + 29 + \
#     9 + 45 + 29 + 3 + 44 + 1 + 29 + 18 + 33 + 24 + 37 + 42 + \
#     20 + 5 + 28 + 18 + 57 + 8 + \
#     24 + 45 + 10 + 21 + 21 + 25 + 42 + 20 + 50 + 27 + 38 + 44 + 23 + \
#     18 + 49 + 34 + 24 + 15 + \
#     0
#
# print('%d, %d, %d' % (a, b, a - b))
# print('c=%d, d=%d' % (c, d))
# print('%d, d=%d' % (c + d / 60, d % 60))
# e = c + d / 60
# print('%d, d=%d' % (e / 60, e % 60))

a = 14 + 21 + 3 + 3 + 7 + 15 + 10 + 4 + \
    24 + 7 + 14 + 11 + 10 + 11 + 16 + 13 + 12 + 18
b = 12 + 3 + 18 + 46 + 19 + 49 + 45 + 41 + \
    17 + 21 + 30 + 55 + 16 + 11 + 24 + 37 + 44 + 47

c = a + b / 60
print('%d : %d' % (c / 60, c % 60))

a = 13 + 172 + 123 + 448 + 4 + 15 + 23 + \
    315 + 161 + 160 + 123 + 144 + 119 + 29 + \
    15 + 141 + 149 + 119 + 90 + 92 + 15 + 11 + \
    139 + 90 + 104 + 9

print('发新数量:%d' % a)

b = 41 + 240 + 166 + 494 + 29 + 50 + 37 +\
    371 + 233 + 236 + 188 + 196 + 159 + 44 + 30 +\
    204 + 207 + 187 + 138 + 123 + 35 + 25 + 219 + 154 + 32
print('收信数量:%d' % b)

a = 15536 - 14260 - 3 - 910
print(a)

a = 9 + 18 + 7 + 13 + 6 + 12 + \
    6 + 12 + 10 + \
    6 + 9 + 9 + 9 + \
    13 + 8 + 11 + 11
b = 8 + 18 + 44 + 7 + 49 + 49 + \
    53 + 4 + 16 + \
    45 + 15 + 25 + 42 + \
    28 + 55 + 18 + 44
a += b//60
print('%d小时%d分钟'%(a//60, a%60))

s='abcdefg'
print(s[:5])
x = 2
y = 4
min = x if x < y else y
print(min)

print('over')

egucrmt0 = 208 + 53 + 6 + 3 + 24 + \
            44 + \
            3 + 14 + 27 + \
            215 + \
            419 + 21 + \
            49 + \
            27 + \
            323 + \
            194 + \
            496 + 60 + 66 + \
            202 + 77 + 38 + \
            554 + 97 + 36 + \
            1022 + 3 + \
            58 + 108 + \
            81 + 158 + 11 + \
            12 + 535 + 3 + 22 + \
            6 + 16 + 5 + \
            294 + \
            294 + \
            112 + \
            279 + 1 + \
            0

egucrmt1 = 72 + 21 + 6 + 3 + 10 + \
            15 + \
            3 + 14 + 3 + \
            15 + \
            38 + \
            23 + \
            2 + \
            118 + \
            36 + \
            248 + 0 + 1 + \
            87 + 2 + 1 + \
            348 + 2 + 5 + \
            317 + 0 + \
            35 + 2 + \
            37 + 92 + 8 + \
            4 + 1010 + 1 + 5 + \
            4 + 14 + 3 + \
            52 + \
            52 + \
            112 + \
            116 + 1 + \
            0

wechat0 = 5 + \
            534 + \
            188 + \
            108 + \
            5 + \
            0

wechat1 = 0 + \
            269 + \
            98 + \
            77 + \
            2 + \
            0

eguweb0 = 363 + \
            1634 + 1728 + \
            2229 + 1721 + \
            533 + 229 + \
            401 + 179 + \
            94 + \
            0

eguweb1 = 175 + \
            999 + 106 + \
            700 + 299 + \
            230 + 176 + \
            110 + 46 + \
            37 + \
            0

print('业务系统: added %d | removed %d' % (egucrmt0, egucrmt1))
print('小程序: added %d | removed %d' % (wechat0, wechat1))
print('官网: added %d | removed %d' % (eguweb0, egucrmt1))

learn0 = 623 + \
            0

learn1 = 80 + \
            0

learnTimeH = 11 + \
                3 + \
                0 + \
                2 + \
                0
learnTimeM = 57 + \
                41 + \
                28 + \
                57 + \
                0

print('learn: added %d | removed %d' % (learn0, learn1))
print('learn time: %d 小时 %d 分钟' % (learnTimeH+learnTimeM // 60, learnTimeM % 60))

crmt_old0 = 14 + 19 + 16 + 14 + 8 + \
            23 + 19 + 14 + 17 + 11 + \
            16 + 16 + 12 + 10 + 14 + \
            15 + 17 + 6

crmt_old = 15 + 8 + 12 + 12 + \
            9 + 6 + 12 + 12 + 13 + \
            13 + 11 + 7 + 3 + 4 + \
            13 + 15 + 11 + 9 + 5 + \
            11 + 19 + 17 + 18 + 9 + \
            27 + 27 + 11 + 5 + 4 + \
            4 + 8 + 0 + 2 + \
            12 + 10 + 10 + \
            16 + 19 + 22 + 20 + 18 + \
            13 + 15 + 13 + 14 + 28 + \
            20 + 21 + 14 + 16 + 16 + \
            11 + 18 + 17 + 12 + 4 + \
            8 + 18 + 14 + 6 + 21 + \
            20 + 15 + 10 + \
            14 + 11 + 16 + 12 + 15 + 19
crmt_old_days = 4 + 5 + 5 + 5 + 5 + 5 + 4 + 3 + 5*5 + 3 + 6

print('old %d / %d = %f'%(crmt_old, crmt_old_days, crmt_old/crmt_old_days))

crmt_now = 23 + 23 + 37 + 27 + 25 + \
            24 + 40 + 31 + 25 + 32 + 16 + \
            29 + 30 + 26 + \
            32 + 28 + 27 + 29 + 27 + \
            31 + 28 + 22 + 14 + 15 + \
            12 + 17 + 14 + 15 + 5 + \
            13 + 15 + 15 + 12 + 7 + \
            19 + 14 + 12 + 23 + 12 + \
            12 + 17 + 20 + 14 + 15 + \
            22 + 21 + 17 + 13 + \
            10 + 14 + 15 + 7 + 18
crmt_now_days = 53

print('now %d / %d = %f'%(crmt_now, crmt_now_days, crmt_now/crmt_now_days))

print('all %d / %d = %f'%(crmt_now+crmt_old, crmt_now_days+crmt_old_days, (crmt_now+crmt_old)/(crmt_now_days+crmt_old_days)))

key = 'Egu%d' % (randint(0, 1000000))

print(key)

print('len: %d' % (len('你好啊123123，'),))


